package 多线程;

import sun.nio.ch.ThreadPool;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author : K k
 * @date : 20:37 2020/10/3
 */
public class ArrayListDemo {
    static List<Integer> list=new ArrayList<>();
    public static void main(String[] args) {

        for (int i=0;i<50;i++){
            Thread t1=new Thread(new runTest());
            t1.start();
        }

        System.out.println(list.size());
    }
}
class runTest implements Runnable{
    @Override
    public void run() {
        ArrayListDemo.list.add(1);
    }
}